package com.yanqu.road.server.cmd.activity.hanghai;

import com.yanqu.road.entity.activity.hanghai.config.HangHaiConfig;
import com.yanqu.road.pb.activity.HangHaiActivityProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.manger.activity.ActivityMgr;
import com.yanqu.road.server.manger.activity.hanghai.HangHaiMgr;
import com.yanqu.road.server.manger.player.GamePlayerMgr;
import com.yanqu.road.utils.YanQuMessageUtils;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.ClientProtocol;
import com.yanqu.road.server.protocol.CrossProtocol;
import com.yanqu.road.server.protocol.GameErrorCode;
import com.yanqu.road.server.protocol.GameProtocol;

@Cmd(code = GameProtocol.S_HANGHAI_ACTIVITY_GET_UNION_LOCK_MEMBER, desc = "获取锁定商会成员名单")
public class GetHangHaiUnionLockMemberCmd extends AbstractCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
//        HangHaiConfig config = HangHaiMgr.getHangHaiConfig();
//        if (config == null || !ActivityMgr.activityInShowTime(config.getActivityInfo())) {
//            ret = GameErrorCode.E_HANGHAI_ACTIVITY_NO_OPEN;
//            return;
//        }
//
//        HangHaiActivityProto.CrossHangHaiReqMsg.Builder builder = HangHaiActivityProto.CrossHangHaiReqMsg.newBuilder();
//        builder.setActivityId(config.getActivityId());
//        builder.setUnionUid(player.getUserInfo().getUnionUid());
//        YanQuMessage message = YanQuMessageUtils.buildMessage(CrossProtocol.C2_HANGHAI_ACTIVITY_GET_UNION_LOCK_MEMBER, builder);
//        GamePlayerMgr.sendChannelPacket(player, message);
    }

    @Override
    public void sendData(GamePlayer player) {
//        if (ret != 0) {
//            HangHaiActivityProto.GetHangHaiUnionLockMemberRespMsg.Builder builder = HangHaiActivityProto.GetHangHaiUnionLockMemberRespMsg.newBuilder();
//            builder.setRet(ret);
//            player.sendChannelPacket(ClientProtocol.U_HANGHAI_ACTIVITY_GET_UNION_LOCK_MEMBER, builder);
//        }
    }
}
